﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net.Core;

namespace Aliyun.OSS.Samples
{
    public class LogOSS
    {
        private static log4net.ILog _Log;

        public static log4net.ILog Log
        {
            get
            {
                //
                if (_Log == null)
                {
                    string strLog4Config = System.Configuration.ConfigurationManager.AppSettings["LogOSS"];
                    //缺配置
                    if(string.IsNullOrEmpty(strLog4Config))
                    { strLog4Config = "Main"; }
                    _Log = log4net.LogManager.GetLogger(strLog4Config); 
                }

                return _Log;
            }
        }

    }
}
